<?php

//initialize the session

if (!isset($_SESSION)){ session_start();}

$path = $_SERVER['DOCUMENT_ROOT'];

//The following variable will be used to collect errors

$error="";

include_once("OurDatabase.class.php");

$query = "SELECT * FROM wms_employer";
$result = mysql_query($query);

if (!$result) die ("Database access failed: " .mysql_error());
$rows = mysql_num_rows($result);

echo "<br>Number of rows in the Table ".$rows;
//$row = mysql_fetch_array($result, MYSQL_NUM);

for ($k = 0 ; $k < $rows ; ++$k)
{
    $row = mysql_fetch_row($result);
    echo <<<_END
<pre>
     Employer ID $row[0]
    Company Name $row[1]
        Industry $row[2]
         Address $row[3]
            City $row[4]
          County $row[5]
           State $row[6]
             Zip $row[7]
  Second Address $row[8]
     Second City $row[9]
   Second County $row[10]
    Second State $row[11]
      Second Zip $row[12]
    Phone Number $row[13]
      Fax Number $row[14]
         Website $row[15]
           Email $row[16]
 Date Registered $row[17]    
</pre>
<form action="company_information.php" method="post">
<input type="hidden" name="delete" value="yes" />
<input type="submit" value="DELETE COMPANY" /></form>
_END;
}
?>
